(()=>{"use strict";var t,e={80102:(t,e,r)=>{var n=y(r(94735)),o=y(r(62616)),a=y(r(90682));r(19867),r(42362);var l=y(r(89816)),i=y(r(29010)),u=r(34178),f=y(r(17395)),c=y(r(20073)),d=y(r(4169)),s=y(r(65387)),p=y(r(9561));function y(t){return t&&t.__esModule?t:{default:t}}a.default.extend(l.default),n.default.init(window.init),window.CTFd=n.default,window.helpers=p.default,window.$=o.default,window.dayjs=a.default,window.nunjucks=i.default,window.Howl=u.Howl,(0,o.default)((function(){(0,d.default)(),(0,s.default)(),(0,f.default)(c.default.urlRoot)}))},68635:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}r(80102);var o=c(r(62616)),a=c(r(94735)),l=function(t,e){if(t&&t.__esModule)return t;if(null===t||"object"!=n(t)&&"function"!=typeof t)return{default:t};var r=f(e);if(r&&r.has(t))return r.get(t);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in t)if("default"!==l&&Object.prototype.hasOwnProperty.call(t,l)){var i=a?Object.getOwnPropertyDescriptor(t,l):null;i&&(i.get||i.set)?Object.defineProperty(o,l,i):o[l]=t[l]}return o.default=t,r&&r.set(t,o),o}(r(7863)),i=c(r(90682));r(19867),r(42362);var u=r(65024);function f(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(f=function(t){return t?r:e})(t)}function c(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var p=(0,o.default)("#score-graph"),y=(0,o.default)("#scoreboard tbody");function h(t){var e,r,n,o=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=d(t))){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,i=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return l=t.done,t},e:function(t){i=!0,a=t},f:function(){try{l||null==r.return||r.return()}finally{if(i)throw a}}}}(document.cookie.split("; "));try{for(o.s();!(e=o.n()).done;){var a=(r=e.value.split("="),n=2,function(t){if(Array.isArray(t))return t}(r)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,l,i=[],u=!0,f=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(i.push(n.value),i.length!==e);u=!0);}catch(t){f=!0,o=t}finally{try{if(!u&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(f)throw o}}return i}}(r,n)||d(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=a[0],i=a[1];if(l===t)return decodeURIComponent(i)}}catch(t){o.e(t)}finally{o.f()}return"zh"}var v=function(){return a.default.api.get_scoreboard_detail({count:10}).then((function(t){var e=t.data,r=Object.keys(e);if(0===r.length)return!1;for(var n,o={textStyle:{color:"white"},title:{left:"center",text:"en"===h("Scr1wCTFdLanguage")?"Top 10 "+("teams"===a.default.config.userMode?"Teams":"Users"):"前十名"+("teams"===a.default.config.userMode?"队伍":"用户"),textStyle:{color:"white"}},tooltip:{trigger:"axis",axisPointer:{type:"cross"}},legend:{type:"scroll",orient:"horizontal",align:"left",bottom:35,data:[],textStyle:{color:"white"}},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},saveAsImage:{}},iconStyle:{borderColor:"rgba(255, 255, 255, 1)"}},grid:{containLabel:!0},xAxis:[{type:"time",boundaryGap:!1,data:[]}],yAxis:[{type:"value"}],dataZoom:[{id:"dataZoomX",type:"slider",xAxisIndex:[0],filterMode:"filter",height:20,top:35,fillerColor:"rgba(233, 236, 241, 0.6)",textStyle:{color:"white"}}],series:[]},l=function(){for(var t=[],a=[],l=0;l<e[r[f]].solves.length;l++){t.push(e[r[f]].solves[l].value);var c=(0,i.default)(e[r[f]].solves[l].date);a.push(c.toDate())}var d=(0,u.cumulativeSum)(t);n=a.map((function(t,e){return[t,d[e]]})),o.legend.data.push(e[r[f]].name);var s={name:e[r[f]].name,type:"line",label:{normal:{position:"top"}},itemStyle:{normal:{color:(0,u.colorHash)(e[r[f]].name+e[r[f]].id)}},data:n};o.series.push(s)},f=0;f<r.length;f++)l();return o}))};function m(){a.default.api.get_scoreboard_list().then((function(t){var e=t.data;y.empty();for(var r=0;r<e.length;r++){var n=["<tr>",'<th scope="row" class="text-center">',r+1,"</th>",'<td><a href="{0}/teams/{1}">'.format(a.default.config.urlRoot,e[r].account_id),(0,u.htmlEntities)(e[r].name),"</a></td>","<td>",e[r].score,"</td>","</tr>"].join("");y.append(n)}})),v().then((function(t){l.init(document.querySelector("#score-graph"),null,{locale:h("Scr1wCTFdLanguage")}).setOption(t)}))}(0,o.default)((function(){setInterval(m,3e5),v().then((function(t){if(!1!==t){p.empty();var e=l.init(document.querySelector("#score-graph"),null,{locale:h("Scr1wCTFdLanguage")});e.setOption(t),(0,o.default)(window).on("resize",(function(){null!=e&&null!=e&&e.resize()}))}else p.html('<h3 class="opacity-50 text-center w-100 justify-content-center align-self-center">'+("en"===h("Scr1wCTFdLanguage")?"No solves yet":"尚未解出题目")+"</h3>")}))})),window.updateScoreboard=m}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var a=r[t]={id:t,loaded:!1,exports:{}};return e[t](a,a.exports,n),a.loaded=!0,a.exports}n.m=e,t=[],n.O=(e,r,o,a)=>{if(!r){var l=1/0;for(c=0;c<t.length;c++){for(var[r,o,a]=t[c],i=!0,u=0;u<r.length;u++)(!1&a||l>=a)&&Object.keys(n.O).every((t=>n.O[t](r[u])))?r.splice(u--,1):(i=!1,a<l&&(l=a));if(i){t.splice(c--,1);var f=o();void 0!==f&&(e=f)}}return e}a=a||0;for(var c=t.length;c>0&&t[c-1][2]>a;c--)t[c]=t[c-1];t[c]=[r,o,a]},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t={775:0,671:0};n.O.j=e=>0===t[e];var e=(e,r)=>{var o,a,[l,i,u]=r,f=0;if(l.some((e=>0!==t[e]))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(u)var c=u(n)}for(e&&e(r);f<l.length;f++)a=l[f],n.o(t,a)&&t[a]&&t[a][0](),t[a]=0;return n.O(c)},r=self.webpackChunkctfd=self.webpackChunkctfd||[];r.forEach(e.bind(null,0)),r.push=e.bind(null,r.push.bind(r))})();var o=n.O(void 0,[759,736,783],(()=>n(68635)));o=n.O(o)})();